package com.kyg.tjtoolmanager.net.netty.init;


import com.kyg.tjtoolmanager.App;
import com.kyg.tjtoolmanager.db.SQLiteUtils;
import com.kyg.tjtoolmanager.net.netty.server.LapiNettyServer;

/**
 * Copyright (C),  2018-2025, ZheJiang Uniview Technologies Co., Ltd. All rights reserved.
 * <http://www.uniview.com/>
 * <p>
 * FileName : StartNettyThread
 * Author   : s04180
 * Date     : 2020/1/15 15:38
 * DESCRIPTION:
 * <p>
 * History:
 * DATE        NAME        DESC
 */
public class StartNettyThread extends Thread {

    /**
     * 宏定义
     */
    private Integer isKeepHttpConnectionPort;

    public void setIsKeepHttpConnectionPort(Integer isKeepHttpConnectionPort) {
        this.isKeepHttpConnectionPort = isKeepHttpConnectionPort;
    }

    @Override
    public void run() {
        try {
            new LapiNettyServer(isKeepHttpConnectionPort).createNetty();
        } catch (Exception e) {
            SQLiteUtils.insertLog("[START_KEEP_HTTP_CONNECTION]" + e.getMessage());
        }
    }
}
